package com.hycc.single;

/*
* 饿汉式单例
* */
public class Hungry {
    //私有构造器
    private Hungry(){

    }

    //定义final静态变量
    private final static Hungry HUNGRY_DEMO = new Hungry();

    public static Hungry getInstance(){
        return HUNGRY_DEMO;
    }
}
